package cn.itlaobing.model;

import java.util.List;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main1 {
	public static void main(String[] args) {
		//创建访问路径，
		String s="classpath:cn/itlaobing/model/inject.xml";
		//建立容器
		AbstractApplicationContext aac=new ClassPathXmlApplicationContext(s);
		Student stu=aac.getBean("student1", Student.class);
		System.out.println(stu.getName());
		System.out.println(stu.getGender());
		System.out.println(stu.getAge());
		System.out.println(stu.getAddress());
		
		List<String> list=aac.getBean("list", List.class);
		for(String l:list)
		{
			System.out.println(l);
		}
	}
}
